package com.dailyblue.java.project.bookstore.controller;

import com.dailyblue.java.project.bookstore.service.CategoryService;
import com.dailyblue.java.project.bookstore.util.JsonResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/category")
public class CategoryController {
    @Resource
    private CategoryService categoryService;

    @GetMapping
    public JsonResult find() {
        return categoryService.find();
    }
}
